package com.findyou.advice;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * @Title: MyAdvice
 * @Author 贾金博
 * @Package com.findyou.advice
 * @Date 2024/12/6 上午8:43
 * @description: 增强类
 */
@Aspect
@Component
public class MyAdvice {
    // 提取出来 后面可以用
    @Pointcut("execution(* com.findyou.service.Impl.AccountServiceImpl.*(..))")
    public void myPoint(){

    }

    @Before("MyAdvice.myPoint()")
    public void before() {
        System.out.println("前置通知");
    }

}
